package com.carleasoft.mps.adu.business.dict.bean.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 字典表管理
 *
 * @author yanghao
 * @date 2021-12-17 17:20
 * @project mps
 */
@Data
@TableName(value = "m_sys_dict")
public class SysDict extends Model<SysDict> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键自增ID
     */
    private String id;

    /**
     * 编码
     */
    private String code;
    /**
     * 字典值
     */
    private String dictValue;
    /**
     * 字典类型
     */
    private String type;
    /**
     * 备注
     */
    private String remark;

    /**
     * 最后更新时间
     */
    @TableField(value = "UPDATE_TIME", fill = FieldFill.UPDATE, update = "now()")
    private LocalDateTime updateTime;

    /**
     * 创建时间
     */
    @JsonIgnore
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
}
